package com.rocky.crm.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * follow_up
 *
 * @author
 */
public class FollowUp implements Serializable {
	private Integer id;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime time;

	/**
	 * 地点
	 */
	private String address;

	/**
	 * 概要
	 */
	private String general;

	/**
	 * 备注
	 */
	private String remark;

	/**
	 * 详细信息
	 */
	private String content;

	/**
	 * 结果
	 */
	private String result;

	/**
	 * 客户编号
	 */
	private Integer customerId;
	private Customer customer;
	/**
	 * 跟进人
	 */
	private Integer managerId;
	private User manager;
	/**
	 * 删除状态
	 */
	private Integer deleteStatus;

	/**
	 * 相关文档
	 */
	private String document;

	private static final long serialVersionUID = 1L;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public LocalDateTime getTime() {
		return time;
	}

	public void setTime(LocalDateTime time) {
		this.time = time;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getGeneral() {
		return general;
	}

	public void setGeneral(String general) {
		this.general = general;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public Integer getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	public Integer getManagerId() {
		return managerId;
	}

	public void setManagerId(Integer managerId) {
		this.managerId = managerId;
	}

	public Integer getDeleteStatus() {
		return deleteStatus;
	}

	public void setDeleteStatus(Integer deleteStatus) {
		this.deleteStatus = deleteStatus;
	}

	public String getDocument() {
		return document;
	}

	public void setDocument(String document) {
		this.document = document;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public User getManager() {
		return manager;
	}

	public void setManager(User manager) {
		this.manager = manager;
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		FollowUp other = (FollowUp) that;
		return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
				&& (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
				&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
				&& (this.getGeneral() == null ? other.getGeneral() == null : this.getGeneral().equals(other.getGeneral()))
				&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
				&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
				&& (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult()))
				&& (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
				&& (this.getManagerId() == null ? other.getManagerId() == null : this.getManagerId().equals(other.getManagerId()))
				&& (this.getDeleteStatus() == null ? other.getDeleteStatus() == null : this.getDeleteStatus().equals(other.getDeleteStatus()))
				&& (this.getDocument() == null ? other.getDocument() == null : this.getDocument().equals(other.getDocument()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
		result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
		result = prime * result + ((getGeneral() == null) ? 0 : getGeneral().hashCode());
		result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
		result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
		result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode());
		result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
		result = prime * result + ((getManagerId() == null) ? 0 : getManagerId().hashCode());
		result = prime * result + ((getDeleteStatus() == null) ? 0 : getDeleteStatus().hashCode());
		result = prime * result + ((getDocument() == null) ? 0 : getDocument().hashCode());
		return result;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", id=").append(id);
		sb.append(", time=").append(time);
		sb.append(", address=").append(address);
		sb.append(", general=").append(general);
		sb.append(", remark=").append(remark);
		sb.append(", content=").append(content);
		sb.append(", result=").append(result);
		sb.append(", customerId=").append(customerId);
		sb.append(", managerId=").append(managerId);
		sb.append(", deleteStatus=").append(deleteStatus);
		sb.append(", document=").append(document);
		sb.append(", serialVersionUID=").append(serialVersionUID);
		sb.append("]");
		return sb.toString();
	}
}